package cn.edu.swufe.surverpark.struts2.service;

import java.util.List;

/**
 *@author 陈龙 E-mail:529914446@qq.com
 *@version创建时间:2015年4月29日下午5:53:42
 *类说明
 */
public interface BaseService<T> {
	//写操作
	public void saveEntity(T t);
	public void saveOrUpdateEntity(T t);
	public void updateEntity(T t);
	public void deleteEntity(T t);
	public void batchEntityByHQL(String hql,Object...objects);
	
	public void executeSQL(String sql,Object...objects);
	
	//读操作
	public T loadEntity(Integer id);
	public T getEntity(Integer id);
	public List<T> findEntityByHQL(String hql,Object...objects);
	public Object uniqueResult(String hql,Object...objects);
	
	public List<T> findAllEntities();
	public List executeSQLQuery(Class clazz,String sql,Object...objects);

}

